package com.dhp.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dhp.model.dto.chart.ChartGenRequest;
import com.dhp.model.dto.chart.ChartQueryRequest;
import com.dhp.model.entity.Chart;
import com.dhp.model.entity.ChartData;
import com.dhp.model.vo.GenChartVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
* @author dhp
*/
public interface ChartService extends IService<Chart> {
    /**
     * 校验
     *
     * @param chart
     * @param add 是否为创建校验
     */
    void validChart(Chart chart, boolean add);

    /**
     * 分页查询
     *
     * @param chartQueryRequest
     * @param request
     * @return
     */
    Page<Chart> listchartByPage(ChartQueryRequest chartQueryRequest, HttpServletRequest request);

    GenChartVO genChartByAI(MultipartFile file, ChartGenRequest chartGenRequest , HttpServletRequest request);


    String getUserInput(Chart chart , ChartData chartData);

    GenChartVO genChartByAIAsync(MultipartFile file, ChartGenRequest chartGenRequest, HttpServletRequest request);

    Page<Chart> listMyChart(ChartQueryRequest chartQueryRequest, HttpServletRequest request);
}
